package com.acwing.partition9;

import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author `RKC`
 * @date 2021/12/4 10:39
 */
public class AC871约数之和 {

    private static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
        String[] s = reader.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        List<Integer> nums = new ArrayList<>(n);
        while (n-- > 0) {
            nums.add(Integer.parseInt(reader.readLine().split(" ")[0]));
        }
        writer.write(divisorSum(nums) + "\n");
        writer.flush();
    }

    private static long divisorSum(List<Integer> nums) {
        Map<Integer, Integer> primeToCount = new HashMap<>();
        for (Integer num : nums) {
            for (int i = 2; i <= num / i; i++) {
                if (num % i == 0) {
                    int count = primeToCount.getOrDefault(i, 0);
                    while (num % i == 0) {
                        count++;
                        num /= i;
                    }
                    primeToCount.put(i, count);
                }
            }
            if (num > 1) primeToCount.put(num, primeToCount.getOrDefault(num, 0) + 1);
        }
        long answer = 1;
        for (Map.Entry<Integer, Integer> entry : primeToCount.entrySet()) {
            int p = entry.getKey(), a = entry.getValue();
            long count = 1;
            //P1^0+P1^1+...+P1^a1
            while (a-- > 0) count = (count * p + 1) % MOD;
            answer = answer * count % MOD;
        }
        return answer;
    }
}
